<template>
	<view>
		<view class="panel-menu">
			<view class="item" v-for="(item,index) in list" :key="index" @click.stop="$go(item.pageUrl)">
				<view class="menu-info">
					{{ item.name }}
				</view>
				<view class="xzfx_icon_arrow_right"></view>
			</view>
		</view>
		<view class="submit-button" @click.stop="loginOut">退出登录</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					{
						name: "个人信息设置",
						pageUrl: "/pages/my/my-info"
					}
				]
			};
		},
		methods: {
			loginOut(){
				uni.removeStorageSync("token");
				setTimeout(() => {
					uni.switchTab({
						url: "/pages/home/home"
					})
				}, 3000)
			}
		}
	}
</script>

<style scoped lang="scss">
	.panel-menu {
		border-radius: 20rpx;
		overflow: hidden;
		margin: $xzfx-spacing;
		background-color: #FFFFFF;
	
		.item {
			height: 100rpx;
			padding: 0 25rpx;
			border-top: 1rpx solid #F1F1F1;
			display: flex;
			justify-content: space-between;
			align-items: center;
	
			.menu-info {
				width: calc(100% - 50rpx);
				font-size: 30rpx;
			}
			.xzfx_icon_arrow_right{
				color: #666;
			}
		}
		.item:nth-child(1){
			border-top: 0;
		}
	}
	.submit-button{
		margin: 60rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		height: 90rpx;
		border-radius: 46rpx;
		background: $xzfx-theme;
		color: #FFFFFF;
		font-size: 32rpx;
		padding: 0 40rpx;
		overflow: hidden;
	}
</style>
